@extends('wechat.member-layout')

@section('head')
    <link href="http://{{ env('QINIU_DOMAIN') }}/css/video-js-6.2.8.css" rel="stylesheet">
    <script src="http://{{ env('QINIU_DOMAIN') }}/js/video.js"></script>
@endsection

@section('content')
    <div class="container" id="container">
        <div class="weui_tab">
            <div class="weui_tab_bd">
                <div class="hd">
                    <h1 class="page_title">查看{{ $wechatUpload->type_word }}</h1>
                    <h1 class="page_desc">{{ $wechatUpload->title }}</h1>
                    <h1 class="page_desc">打赏价格：{{ $wechatUpload->min_price }} ~ {{ $wechatUpload->max_price }}</h1>
                </div>
                @if(1 == $wechatUpload->type)
                    <img src="{{ $wechatUpload->url }}" alt="" style="max-width: 100%;">
                @elseif(2 == $wechatUpload->type)
                    <video id="my-video" style="margin:0 auto;margin-bottom: 30px;" class="video-js vjs-big-play-centered" controls preload="none" poster="{{ $wechatUpload->guest_image }}">
                        <source src="{{ $wechatUpload->url }}" type='video/mp4'>
                        <p class="vjs-no-js">
                            请打开JavaScript来支持网页视频播放
                            <a href="http://videojs.com/html5-video-support/" target="_blank">支持 HTML5 视频</a>
                        </p>
                    </video>
                @endif
                @if($openid == $wechatUpload->openid)
                    <article class="weui_article">
                        <div id="short_url" style="display: block; font-size: 18px;">
                            推广短连接：<a href="{{ $wechatUpload->promotion_url }}">{{ $wechatUpload->promotion_url }}</a>
                            <br>
                            <p style="text-align: center;font-size: 14px;">（长按链接可拷贝或复制）</p>
                            <a href="/wechat/member-center">
                                <input class="weui_btn weui_btn_primary" id="member-center" type="button" value="去个人中心">
                            </a>
                        </div>
                    </article>
                @endif
            </div>
        </div>

    </div>
    <div class="weui-footer" style="position:fixed;bottom:0;width:100%;">
        <p class="weui-footer__links" style="text-align: center">
            <a href="/wechat/tousu?id={{ $wechatUpload->id }}" class="weui-footer__link" style="color:#2c78d6">我要投诉</a>
        </p>
        <p class="weui-footer__text"></p>
    </div>
@endsection

@section('js')
    <script src="http://{{ env('QINIU_DOMAIN') }}/js/zepto.min.js"></script>
@endsection